<template>
  <el-menu
    router
    class="el-menu-vertical-demo el-aside h100"
    :collapse="false"
    background-color="#545c64"
    text-color="#fff"
    active-text-color="#ffd04b"
  >
    <el-menu-item
      v-for="(menuitem,index) in visibleRoutes" :key="index"
      :index="menuitem.path"
    >
      {{menuitem.text}}
    </el-menu-item>
  </el-menu>
</template>

<script>
import { mapGetters } from 'vuex'
import MenuItem from './MenuItem'
// import { jump2link } from '@/assets/utils'
// import { isExternal } from '@/assets/utils/validate'

export default {
  components: { MenuItem },
  computed: {
    ...mapGetters([
    //   'permission_routes',
      'sidebar'
    ]),
    // visibleRoutes() {
    //   return this.permission_routes.filter(route => !route.hidden)
    // }
  },
  data(){
    return{
      visibleRoutes:[
        {
          path:"/",
          text:"店铺订单",
        },{
          path:"/",
          text:"职工绩效",
        },{
          path:"/",
          text:"审批单处理",
        },{
          path:"/",
          text:"员工录入",
        },
      ],
    }
  },
  methods: {
    checkLink(path) {
    //   // 外链则在新标签中打开
    //   const curRoute = this.$route.path;
    //   if (isExternal(path)) {
    //     setTimeout(() => {
    //       this.$router.push(curRoute);
    //     }, 20);
    //     jump2link(path, '_blank')
    //   }
    }
  }
}
</script>
<style scoped>
  .el-aside {
    display: block;
    position: relative;
    overflow-y: scroll;
  }
</style>
